import React from 'react'
import { Button, Space, Swiper, Toast } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import './Release.scss'
export default function Release() {
    let navigate = useNavigate()

    // 轮播资源
    const colors = ['#ace0ff', '#bcffbd', '#e4fabd', '#ffcfac']
    const items = colors.map((color, index) => (
        <Swiper.Item key={index}>
            <div
                style={{ background: color, height: "100px", borderRadius: "10px" }}
                onClick={() => {
                    Toast.show(`你点击了卡片 ${index + 1}`)
                }}
            >
                {index + 1}
            </div>
        </Swiper.Item>
    ))

    return (
        <div className='relBase'>
            {/* 顶部 */}
            <div className='relTop'>
                求职
            </div>
            {/* 功能 */}
            <div className='relBox'>
                <div className='relBox_child1' onClick={()=>{navigate("")}}>
                    <div className='fabuBg'></div>
                    <div className="fabuBg2">
                        <p>发布职位</p>
                    </div>
                </div>
                <div className='relBox_child2'>
                    <div className='relBox_child2s'>
                        <div className='renzheng'></div>
                        <div className='fabuBg2'>
                            <p>企业认证</p>
                        </div>
                    </div>
                    <div>招聘管理</div>
                </div>
            </div>
            {/* 轮播 */}
            <div className='rel_lunbo'>
                <Swiper autoplay>{items}</Swiper>
            </div>
        </div>
    )
}
